using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace SharePointExplorer
{
    /// <summary>
    /// Level type of Node
    /// </summary>
    public enum LevelType 
    {
        /// <summary>
        /// Server Type
        /// </summary>
        Server = 0,
        /// <summary>
        /// Web Site Type
        /// </summary>
        Web = 1, 
        /// <summary>
        /// Doclib Type
        /// </summary>
        DocLib,
        /// <summary>
        /// Folder Type
        /// </summary>
        Folder, 
        /// <summary>
        /// File Type
        /// </summary>
        File
    };

    /// <summary>
    /// Tree Node for Explorer
    /// </summary>
    public class TGFTreeNode  
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        public TGFTreeNode()
        {}

        private LevelType _level;
        private string _rootWSS;
        private string _title;
        private string _url;
        private string _docLibUrl;
        private string _docLibName;
        private string _domainIdent;
        private string _loginIdent;
        private string _passwordIdent;
        private string _AuthorDocument;
        private DateTime _Lastmodification;
        private string _DocumentType;
 
        /// <summary>
        ///  The level type of the node, to be able to track if the node is pointing to a web, doc lib or folder
        /// </summary>
        public LevelType Level
        {
            get
            {
                return _level;
            }
            set
            {
                _level = value;
            }
        }

        /// <summary>
        /// The name of the Document Library
        /// </summary>
        public string DocLibName
        {
            get
            {
                return _docLibName;
            }
            set
            {
                _docLibName = value;
            }
        }

        /// <summary>
        /// The address of the Doc Library 
        /// </summary>
        public string DocLibUrl
        {
            get
            {

                return _docLibUrl;
            }
            set
            {
                _docLibUrl = value;
            }
        }

        /// <summary>
        /// The title of the node
        /// </summary>
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                _title = value;
            }
        }
        
        /// <summary>
        /// The url of the node
        /// </summary>
        public string Url
        {
            get
            {
                return _url;
            }
            set
            {
                _url = value;
            }
        }

        /// <summary>
        /// The WSS root of the branch
        /// </summary>
        public string RootWSS
        {
            get
            {
                return _rootWSS;
            }
            set
            {
                _rootWSS = value;
            }
        }

        /// <summary>
        /// Domain User for Credential
        /// </summary>
        public string DomainIdent
        {
            get
            {
                return _domainIdent;
            }
            set
            {
                _domainIdent = value;
            }
        }

        /// <summary>
        /// Login User for Credential
        /// </summary>
        public string LoginIdent
        {
            get
            {
                return _loginIdent;
            }
            set
            {
                _loginIdent = value;
            }
        }

        /// <summary>
        /// Password User for Credential
        /// </summary>
        public string PasswordIdent
        {
            get
            {
                return _passwordIdent;
            }
            set
            {
                _passwordIdent = value;
            }
        }

        /// <summary>
        /// Author of the SharePoint document
        /// </summary>
        public string AuthorDocument
        {
            get
            {
                return _AuthorDocument;
            }
            set
            {
                _AuthorDocument = value;
            }
        }

        /// <summary>
        /// SharePoint Document Type
        /// </summary>
        public string DocumentType
        {
            get
            {
                return _DocumentType;
            }
            set
            {
                _DocumentType = value;
            }
        }
        
        /// <summary>
        /// Date time of the last file modification
        /// </summary>
        public DateTime Lastmodification
        {
            get 
            {
                return _Lastmodification;
            }
            set
            {
                _Lastmodification = value;
            }
        }


    }
}
